<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .content {
        text-align: center;
        line-height: 200px;
      }

      /*使用浮动*/
      /*  .left{
            float: left;
            width: 200px;
            height: 200px;
            background-color: blue;
        }
        .right{
            width: 200px;
            height: 200px;
            background-color: red;
            float: right;
        }
        .center{
            margin-left: 200px;
            margin-right: 200px;
            height: 200px;
            background-color: green;
        }

        .box{
            overflow: hidden;
        } */

      /*使用flex */
      /*  .box{
            display: flex;
        } 
        .left{
            width: 200px;
            height: 200px;
            background-color: blue;
        }
        .right{
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .center{
            flex: 1;
            height: 200px;
            background-color: green;
        } */

      /*使用inline-block 加 margin负值*/
      /*  .box{
            padding-left: 200px;
            padding-right: 200px;
        }
        .left{
            margin-left: -200px;
            display: inline-block;
            width: 200px;
            height: 200px;
            background-color: blue;
        }
        .right{
            margin-right: -200px;
            display: inline-block;
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .center{
            width: 100%;
            display: inline-block;
            height: 200px;
            background-color: green;
        }  */

      /* 实现圣杯布局 */
      /* .box{
            padding-left: 200px;
            padding-right: 200px;
            overflow: hidden;
        }
        .left{
            margin-left: -200px;
            position: absolute;
            width: 200px;
            height: 200px;
            background-color: blue;
        }
        .right{
            float: left;
            margin-right: -200px;
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .center{
            float: left;
            width: 100%;
            height: 200px;
            background-color: green;
        }  */

      /* 实现双飞翼布局 */
      .box {
        overflow: hidden;
      }
      .left {
        float: left;
        width: 200px;
        height: 200px;
        background-color: blue;
        margin-left: -100%;
      }
      .right {
        float: left;
        width: 200px;
        height: 200px;
        background-color: red;
        margin-left: -200px;
      }
      .center {
        width: 100%;
        float: left;
        height: 200px;
      }
      .inner {
        margin-left: 200px;
        margin-right: 200px;
        height: 200px;
        background-color: green;
      }
    </style>
  </head>
  <body>
    <!--使用浮动实现三列布局-->
    <!--  <div class="box">
    <div class="left content">left</div>
    <div class="right content">right</div>
    <div class="center content">center</div>
    </div> -->

    <!--使用flex实现三列布局-->
    <!--  <div class="box">
        <div class="left content">left</div>
        <div class="center content">center</div>
        <div class="right content">right</div>
    </div> -->

    <!--使用inline-block实现三列布局-->
    <!-- <div class="box">
        <div class="left content">left</div><div class="center content">center</div><div class="right content">right</div>
    </div>  -->

    <!--圣杯布局-->
    <!--  <div class="box">  
        <div class="center content">center</div>
        <div class="left content">left</div>
        <div class="right content">right</div>
    </div> -->

    <!--双飞翼布局-->
    <div class="box">
      <div class="center">
        <div class="inner content">center</div>
      </div>
      <div class="left content">left</div>
      <div class="right content">right</div>
    </div>
  </body>
</html>
